<?php
require_once 'bootstrap.php';
$config = array_merge($config, array());
system_session::start(isset($config['session']) ? $config['session'] : array());
isset($config['view']['template']) && system_view_abstract::setTemplate($config['view']['template']);
$front = system_controller_front::getInstance();
if(isset($config['front']['base_controller'])) {
	$front->setControllerDirectory($config['front']['base_controller']);
}
isset($config['front']['throw_exceptions']) && $front->throwExceptions($config['front']['throw_exceptions']);
isset($config['front']['base_url']) && $front->setBaseUrl($config['front']['base_url']);
if(isset($config['route'])) {
	$front->startRouter(_DIRECTORY_APP . DIRECTORY_SEPARATOR . $config['route']);
}
$front->dispatch();
